package cn.exam;

import java.util.Scanner;

public class Em1 {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        System.out.print("请字符串(exit退出输入)：");
        while(true) {
            String t = s.nextLine();
            if("exit".equalsIgnoreCase(t)){
                break;
            }
            if (t.matches("[\u4e00-\u9fa5]+")) {
                System.out.println("中文：" + t);
            } else if (t.trim().matches("[a-zA-Z]+")) {
                System.out.println("En：" + t);
            } else if (t.matches("[-+]?\\d+")) {
                System.out.println("整数：" + t);
            } else if (t.matches("[-+]?[0-9]*\\.\\d+")) {
                System.out.println("小数：" + t);
            } else {
                System.out.println("其它：" + t);
            }
        }
    }
}
